package handler.channel;

import constants.GameConstants;
import client.DbgPlayer;
import client.items.ISkill;
import client.skills.SkillFactory;
import client.skills.SkillStatEffect;
import tools.AttackPair;
import java.awt.Point;
import java.util.List;

public class AttackInfo {

    public int skill, charge, lastAttackTickCount;
    public List<AttackPair> allDamage;
    public Point position;
    public byte  tbyte, display, animation, speed, csstar, AOE, slot;
    public short hits, targets;
    public int skillLevel; //test v172
    public final SkillStatEffect getAttackEffect(final DbgPlayer chr, int skillLevel, final ISkill skill_) {
	if (skillLevel == 0) {
	    return null;
	}
	if (GameConstants.isLinkedAttackSkill(skill)) {
	    final ISkill skillLink = SkillFactory.getSkill(skill);
//	    if (display > 80) {
//		if (!skillLink.getAction()) {
//		    //AutobanManager.getInstance().autoban(chr.getClient(), "No delay hack, SkillID : " + skill);
//		    return null;
//		}
//	    }
	    return skillLink.getEffect(chr, skillLevel);
	}
//	if (display > 80) {
//	    if (!skill_.getAction()) {
//		AutobanManager.getInstance().autoban(chr.getClient(), "No delay hack, SkillID : " + skill);
//		return null;
//	    }
//	}
	return skill_.getEffect(chr, skillLevel);
    }
}
